<div>
<div ng-if="ele.type == 'text' && ele.show !== 'no'" >
  <div class="form-group">
    <label class="col-sm-2 control-label" 
    for={{ele.id}}>{{ele.title}}</label>
    <div class="col-sm-10">
      <input id={{ele.id}} type="text" class="form-control" 
      placeholder={{ele.placeholder}} 
      ng-model="result[ele.id]"
      ng-required={{ele.required}}
      ng-disabled=ele.lock
      >
      <span class="help-block m-b-none">{{ele.tip}}</span>
    </div>
  </div>
</div>

  <div ng-if="ele.type == 'number' && ele.show !== 'no'">
  <div class="form-group">
    <label class="col-sm-2 control-label" 
    for={{ele.id}}>{{ele.title}}</label>
    <div class="col-sm-10">
      <input id={{ele.id}} type="number" class="form-control" 
      placeholder={{ele.placeholder}} 
      ng-model="result[ele.id]"
      ng-required={{ele.required}}
      ng-disabled=ele.lock
      >
      <span class="help-block m-b-none">{{ele.tip}}</span>
    </div>
  </div>
  </div>

  <div ng-if="ele.type == 'static'">
    <div class="form-group">
      <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
        <p class="form-control-static"
        >{{result[ele.id]}}</p>
      </div>
    </div>                    
    </div>

    <div ng-if="ele.type == 'title'">
        <div class="form-group">
          <label class="col-sm-2 control-label bold"><b>{{ele.title}}</b></label>
          
        </div>                    
        <!--<div class="line line-dashed b-b line-lg pull-in"></div>-->
        </div>

  <div ng-if="ele.type == 'select' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
          <ui-select ng-model="result[ele.id]" theme="bootstrap"
          ng-change="ele.change(result[ele.id])"
          ng-disabled=ele.lock
          >
            <ui-select-match placeholder="请选择一个......">{{$select.selected.name}}</ui-select-match>
            <ui-select-choices 
            repeat="item.value as item in ele.info | filter: $select.search">
              <span ng-bind-html="item.name | highlight: $select.search"></span>
            </ui-select-choices>
          </ui-select>
          <span class="help-block m-b-none">{{ele.tip}}</span>
      </div>
    </div>
  </div>


  <div ng-if="ele.type == 'switch' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
        <label class="i-switch m-t-xs m-r">
          <input type="checkbox" 
            ng-checked="ele.value == '1'"
            name={{ele.id}}
            ng-true-value="'1'"
            ng-false-value="'0'"
            ng-model="result[ele.id]"
            ng-disabled=ele.lock
          >
          <i></i>
        </label>
        <span class="help-block m-b-none">{{ele.tip}}</span>
      </div>
    </div>
  </div>


  <div ng-if="ele.type == 'date1' && ele.show !== 'no'">
    <div class="form-group">
    <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
        <div class="input-group w-md">
          <input type="text" class="form-control" 
          datepicker-popup="yyyy-MM-dd" 
          ng-model="dateshow[ele.id].label" 
          is-open="dateshow[ele.id].opened" 
          ng-required="true" close-text="Close" readonly
          />
          <span class="input-group-btn" >
            <button type="button" class="btn btn-default" 
            ng-click="open($event, dateshow[ele.id])">
            <i class="glyphicon glyphicon-calendar"></i></button>
          </span>
        </div>
      </div>
    </div>
  </div>



  <div ng-if="ele.type == 'radiobutton' && ele.show !== 'no'">
    <div class="form-group">
    <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
          <label ng-repeat="item in ele.info"
          class="i-checks  checkbox-inline">
            <input type="radio" value={{item.value}} name={{ele.id}}
            ng-checked="result[ele.id] == item.value"
            ng-model="result[ele.id]"
            ng-disabled=ele.lock
            ng-click="ele.click(form)"
            >
            <i></i>
            {{item.name}}
          </label>
      </div>
    </div>
  </div>


  <div ng-if="ele.type == 'image' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-3">
        <img ng-src="{{result[ele.id]}}" width="250" height="150" 
        ng-model="result[ele.id]">
        <input type="file" nv-file-select 
          uploader="imageshow[ele.id]['uploader']" />
        
      </div>
      <div class="col-sm-7">
        <div class="alert alert-info"
          ng-show="ele.tip !== undefined"
        >
          {{ele.tip}}
        </div>
        <ul class="list-group">
            <li class="list-group-item" 
            ng-repeat="item in imageshow[ele.id].uploader.queue">
                文件名: <span ng-bind="item.file.name"></span>
                <button type="button" class="btn btn-default btn-xs ml10"  
                ng-click="item.upload()"><span class="glyphicon glyphicon-upload"></span> 上传</button>
                <div class="progress mt10">
                    <div class="progress-bar" role="progressbar" ng-style="{ 'width': imageshow[ele.id].uploader.progress + '%' }"></div>
                </div>
            </li>
        </ul>
      </div>
    </div>
  </div>



  <div ng-if="ele.type == 'textarea' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label">{{ele.title}}</label>
      <div class="col-sm-10">
        <div text-angular ng-model="result[ele.id]"
          ng-if="ele.state != 'normal'"
        ></div>
        <textarea class="form-control" rows="3"
        ng-model="result[ele.id]"
          ng-if="ele.state == 'normal'"
        ></textarea>
      </div>
    </div>
  </div>


  <div ng-if="ele.type == 'checkbox' && ele.show !== 'no'">
    <div class="form-group">
    <label class="col-sm-2 control-label">{{ele.title}}</label>

      <div class="col-sm-10">
          <label ng-repeat="item in ele.info"
          class="i-checks checkbox-inline">
            <input type="checkbox" value={{item.value}}
            ng-checked="result[ele.id][item.value]"
            name={{ele.id}}
            ng-model="result[ele.id][item.value]"
            >
            <i></i>
            {{item.name}}
          </label>
      </div>
    </div>
  </div>


  <div ng-if="ele.type == 'button' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label" 
      for={{ele.id}}>{{ele.title}}</label>
      <div class="col-sm-10">
        <button class="btn m-b-xs w-xs btn-primary mr10"
          type="button"
          ng-repeat="item in ele.info"
          ng-click="item.btnclick(form)"
        >{{item.label}}</button>
      </div>
    </div>
    <div class="line line-dashed b-b line-lg pull-in"></div>
  </div>


  <div ng-if="ele.type == 'table' && ele.show !== 'no'">
    <div class="form-group">
      <label class="col-sm-2 control-label" 
      for={{ele.id}}>{{ele.title}}</label>
      <div class="col-sm-10">
        <table class="table table-striped m-b-none">
          <thead>
            <tr>
              <th ng-repeat="c in ele.col">{{c.title}}</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="d in result[ele.id]">
              <td ng-repeat="c in ele.col">
                <div ng-if="c.col !== undefined" 
                >{{d[c.col]}}</div>
                <button class="btn btn-xs btn-primary"
                  type="button"
                  ng-if="c.col === undefined"
                  ng-click="c.click(form, d)"
                >{{c.clickname}}</button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div class="line line-dashed b-b line-lg pull-in"></div>
  </div>





</div>
           